import request from '/@/utils/request';

/**
 * 学生管理
 * @param params 要传的参数值
 * @returns 返回接口数据
 * @method pupilInfo 获取学生信息
 * @method delPupilInfo 根据学生id删除学生信息
 * @method updatePupilInfo 根据学生id修改学生信息
 * @method getPupilInfo 根据学生id获取学生信息
 * @method lessonInfo 获取课程信息
 * @method getLessonInfo 根据课程名称获取课程信息
 */

export function pupilInfo(params: number) {
	return request({
		url: `student-lesson/query?Page=${params}`,
		method: 'get',
	});
}

export function delPupilInfo(params: any) {
    return request({
        url:' student/delete',
        method: 'delete',
		data: params,
    });
}

export function updatePupilInfo(params: any) {
    return request({
        url: `student/update/${params.student_id}`,
        method: 'put',
		data: params.info,
    });
}

export function getPupilInfo(params: any) {
	return request({
		url: `student-lesson/query?student_id=${params.student_id}&student_name=${params.student_name}&lesson_name=${params.lesson_name}&Page=${params.Page}`,
		method: 'get',
	});
}

export function lessonInfo() {
    return request({
      url: "lesson?Size=100",
      method: "get",
    });
}
